import {defineConfig} from 'umi';
import routes from './routes';

export default defineConfig({
  title: '巨比特云商家',
  routes,
  history: {
    type: 'browser',
  },
  metas: [
    {httpEquiv: 'Cache-Control', content: 'no-cache'},
    {httpEquiv: 'Pragma', content: 'no-cache'},
    {httpEquiv: 'Expires', content: '0'},
  ],
  hash: true,
  esbuildMinifyIIFE: true,
  npmClient: 'pnpm',
  plugins: [
    '@umijs/plugins/dist/initial-state',
    '@umijs/plugins/dist/model',
    '@umijs/plugins/dist/dva',
    '@umijs/plugins/dist/antd',
    '@umijs/plugins/dist/request',
    '@umijs/plugins/dist/moment2dayjs',
    '@umijs/plugins/dist/access',
  ],
  moment2dayjs: {
    preset: 'antd',
    plugins: ['duration'],
  },
  headScripts: [
    {src: '/scripts/loading.js', async: true},
  ],
  initialState: {},
  model: {},
  dva: {},
  antd: {},
  request: {},
  access: {},
});
